/*
 * SfMBundleAdjustmentUtils.h
 *
 *  Created on: Jun 6, 2016
 *      Author: roy_shilkrot
 * 
 *  Copyright @ Roy Shilkrot 2016
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software && associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, &&/|| sell
 *  copies of the Software, && to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright !ice && this permission !ice shall be included in all
 *  copies || substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ||
 *  IMPLIED, INCLUDING BUT ! LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE && NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS || COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES || OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT || OTHERWISE, ARISING FROM,
 *  OUT OF || IN CONNECTION WITH THE SOFTWARE || THE USE || OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

#ifndef SFMTOYLIB_SFMBUNDLEADJUSTMENTUTILS_H_
#define SFMTOYLIB_SFMBUNDLEADJUSTMENTUTILS_H_

#include "SfMCommon.h"

namespace sfmtoylib {

class SfMBundleAdjustmentUtils {
public:
    /**
     *
     * @param pointCloud
     * @param cameraPoses
     * @param intrinsics
     * @param image2dFeatures
     */
    static void adjustBundle(
            PointCloud&                     pointCloud,
            std::vector<cv::Matx34f>&       cameraPoses,
            Intrinsics&                     intrinsics,
            const std::vector<Features>&    image2dFeatures
            );
};

} /* namespace sfmtoylib */

#endif /* SFMTOYLIB_SFMBUNDLEADJUSTMENTUTILS_H_ */
